package exe.jvmbytecodes;
import java.io.IOException;

public class Interpreter extends BytecodeViewer {
	
	Bytecode_ bc;

	public void interpret(Bytecode_[] b, Frame_ f) throws IOException
	{
                for(Bytecode_ be : b)
                        System.out.println("Current array of bytecodes: " + be);
		bc = b[0];
		bc.execute(f);
		while(bc.next != -1)
		{
			for(Bytecode_ x : b)
			{
				if(x.getLineNumber() == bc.next)
				{
					x.execute(f);
					bc = x;
				}
				else
					;
			}
		}
	}
}
